home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
libs
/
pdcurs21
/
private
/
_ckbiosk.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-30
|
2KB
|
72 lines
#if defined (DOS)
#include <conio.h>
#endif
#define CURSES_LIBRARY 1
#define NEEDS_OS2 1
#include <curses.h>
#ifdef PDCDEBUG
char *rcsid__ckbiosk = "$Header: C:\CURSES\private\RCS\_ckbiosk.c 2.1 1993/06/18 20:22:32 MH Rel MH $";
#endif
/*man-start*********************************************************************
PDC_check_bios_key() - Check BIOS key data area for input
PDCurses Description:
This is a private PDCurses routine.
This routine will check the BIOS for any indication that
keystrokes are pending.
PDCurses Return Value:
Returns 1 if a keyboard character is available, 0 otherwise.
PDCurses Errors:
No errors are defined for this function.
Portability:
PDCurses bool PDC_check_bios_key( void );
**man-end**********************************************************************/
bool PDC_check_bios_key(void)
{
#ifdef OS2
#if !defined(MSC)
KBDKEYINFO keyInfo;
#endif
#endif
#ifdef PDCDEBUG
if (trace_on) PDC_debug("PDC_check_bios_key() - called\n");
#endif
#ifdef FLEXOS
retcode = s_get(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
return( (retcode < 0L) ? ERR : vir.vc_tahead );
#endif
#if defined (DOS)
return(kbhit());
#endif
#ifdef OS2
#if !defined(MSC)
/* KbdCharIn(&keyInfo, IO_NOWAIT, 0);*/ /* get a character */
KbdPeek(&keyInfo, 0); /* peek at keyboard */
return (keyInfo.fbStatus != 0);
#else
return(kbhit());
#endif
#endif
#ifdef UNIX
return(PDC_kbhit());
#endif
}